
import { lazy } from 'react'
import { Navigate } from 'react-router-dom'
import shouConfig from './shouConfig'
import cyyroute from './cyyroute'
import CjnRouterConfig from './CjnRouterConfig.js'
import JrouteConfig from './JrouteConfig'
import zzConfig from './zzConfig'
import zzConfigt from './zzConfigt'
import routers from './routers'
var Index = lazy(() => import('@/views/Index/Index.tsx'))
var Login = lazy(() => import('@/views/Login/Login.tsx'))
var NotFound = lazy(() => import('@/views/NotFound/NotFound.tsx'))
var Home = lazy(() => import('../views/Index/Home/Home.tsx'))



export default [
    {
        path: '/index',
        element: <Index />,
        children: [

            ...zzConfig,
            ...zzConfigt,
            ...shouConfig,

            ...cyyroute,

            ...routers,
            ...JrouteConfig,
            {
                path: '/index/home',
                element: <Home />,

            },

            ...CjnRouterConfig,

            {
                path: '/index',
                element: <Navigate to="/index/home" />
            },
            {
                path: '*',
                element: <NotFound />
            }
        ]
    },
    {
        path: '/login',
        element: <Login />
    },
    {
        path: '/',
        element: <Navigate to="/index" />
    },
    {
        path: '*',
        element: <NotFound />
    },
]